<?php
  include_once("session.php");
  include_once('constants.php');
  if ( ! IsSessionValid() ) { 
    echo "<script>document.location='index.php';</script>";   
    exit;
  }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title><?php echo $product_name;?></title>
    <link rel="stylesheet" href="css/main.css" type="text/css" />
<style type="text/css">
/*<![CDATA[*/
    v\:* {behavior:url(#default#VML);}
/*]]>*/
</style>
<?php
  $serverName = $_SERVER["SERVER_NAME"];
  //$ip = gethostbyname ($SERVER_NAME);
  //$server = gethostbyaddr($ip); 
  if ( $serverName === "localhost")
  {
?>
  <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA6cs7716kYs3Ko1SvfMt_exQo_KDeR3Aqq1itQWePL6bFvREVmBR1hGKRwOjFtE3qlVLZ6mo8SU2EvQ" type="text/javascript">
  </script>
<?php
  } else {      
?>
  <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA6cs7716kYs3Ko1SvfMt_exQXdHDrzlCyUW1cOQLk9qowMRLGdxT4IMJUue67Jy2jbNedZmC-wzC96g" type="text/javascript">
  </script>  
<?php } ?>
<script type="text/javascript" src="scripts/array.js"></script>
<script type="text/javascript" src="scripts/mymarkers.js"></script>
<script type="text/javascript" src="scripts/main.js"></script>
  </head>
  <body onload="init(true)" onunload="GUnload()">
    <div id="main">
      <?php 
      include ("header.php");      
      ?>
      <div id="content">
          <div id="submenu">
            <table class="tabmenu" cellspacing="0" cellpadding="0" width="100%">
              <tbody>
                <tr>
                  <td class="tabspacer"/>
                  <td class="tabon"  id="tabpanel1" onclick="updateTabs(0);"><a class="menu" onclick="this.blur();" href="#">Posts</a></td>
                  <td class="tabspacer"/>
                  <td class="taboff" id="tabpanel2" onclick="updateTabs(1);"><a class="menu" onclick="this.blur();" href="#">People</a></td>
                  <td class="tabspacer"/>
                  <td width="80%" align="right">                    
                    <form id="refresh" action="#" onsubmit="changeUpdate();return false;">
                    <ul class="menu">
                      
                      <li class="menu">                    
                        <img src="img/kml-icon-16x16.png" alt="kml icon"><a class="main" id="exportToKml" href="listPoints.php?userLogin=<?php echo $sessionUserLogin?>&userTid=<?php echo $sessionUserTid?>"> View in GEarth</a>
                      </li>
                      <li class="last">                    
                        <img src="img/feed-icon-14x14.png" alt="feed icon"><a class="main" id="exportToGeoRss" href="listPointsGeoRss.php?userLogin=<?php echo $sessionUserLogin?>&userTid=<?php echo $sessionUserTid?>"> GeoRSS</a>
                      </li>
                    </ul>
                    </form>
                  </td>
                </tr>
              </tbody>
            </table>            
          </div><!-- submenu-->        
        
        <div id="contentLeft">          
          <form action="main.php" method="get">          
          <div class="tabpane" id="listPoints">
            Loading...
          </div><!-- list Points-->                    
          <div class="tabactions" align="right">
            Select: <a onclick="selectAllMarkers(true)" href="#">All</a>, <a onclick="selectAllMarkers(false)" href="#">None</a>            
            <input type="button" value="Delete" id="deleteButton" onclick="deleteMarkers();"/>
            <input type="button" value="Show"   id="showButton" onclick="showMarkers();"/>
            <input type="button" value="Hide"   id="hideButton" onclick="hideMarkers();"/>                                                  
          </div>
          </form>
        </div><!-- content left-->
        
        <div id="contentRight">
          <br />
          <?php include("ads.php"); ?>
        </div><!-- content right-->
        
        <div id="map"></div>
      </div><!-- content -->
      <?php include ("footer.php"); ?>
    </div><!-- main -->
    <?php include ("ga.php"); ?>
  </body>
</html>

